<?php
$base_ = base_url();
$base_img = base_url() . "css/images/";


?>

<script type="text/javascript">
    jQuery(document).ready(function () {


        $('.last_report_link').mouseover(function () {
            $(this).css('cursor', 'pointer');
            $(this).find('.hidden_menu').show();
        }).mouseout(function () {
                    $(this).find('.hidden_menu').hide();
                });

    });

</script>
<div class="lReportsNadpis">
    <h3>Posledné pridané udalosti</h3></div>
<div class="lReports">
    <?php
    $plus = 0;
    if (count($lastReports) == 0) {
        echo "<div style='padding:5px;font-weight:bold;'>Ľutujeme, ale pre Váš filter <span style='color:gray;font-weight:normal;'>oblastí</span>
			neexistujú udalosti. Môžete si ho zmeniť v 
			<a style='text-decoration:none;color:red;font-weight:bold;' href='" . base_url() . "myprofile'>profile</a>.</div>";
    }
    foreach ($lastReports as $key) {
        echo "<div class='last_report_link'>";
        if ($reported[$plus] > 0) {
            $color = 'gray';
            $opacity = '0.5';
        } else {
            $color = 'black';
            $opacity = '1.0';
        }
        $desc = "<img src='" . $base_img . $obr[$plus] . "' height='15' style='vertical-align:top;border:none;opacity:" . $opacity . "'>";
        echo $desc;

        echo " <span style='color:" . $color . ";'>" . $date[$plus] . " " . $time[$plus] .
            " - " . $key['street'] .
            ", " . $city[$plus];
        echo "</span><span style='display:none;color: gray; font-size: 10px;' class='hidden_menu'>
			<br /> 
			<a class='last_show_on_map' onclick='javascript:focus_to(" . $lat[$plus] . "," . $lng[$plus] . ");'>Zobraziť na mape </a> |
			<a class='last_permalink' href='report/" . $key['report_id'] . "-" . url_title($key['street_noaccent']) . "-" . url_title($key['city_noaccent']) . "'>Pevný link</a>
			</span>";
        echo br(1);
        $plus++;
        echo "</div>";
    }

    ?>
</div>